<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        img {
            width: 200px;
            height: 200px;
        }

        p {
            width: 100px;
            height: 100px;
        }

        #box {
            background: red;
        }

        #box1 {
            background: yellowgreen;
        }
    </style>
</head>

<body>
    <!-- 容器 -->
    <div id="app">
        
        <img v-bind:src="url"><br />
        <input v-bind:type="leixing">
        <p v-bind:id="name"></p>
        <hr>
        <h1>v-bind简写方式</h1>
        <img :src="url"><br />
        <input :type="leixing">
        <p :id="name"></p>
    </div>
</body>

</html>
<script>
    //初始化Vue实例,进行关联
    const VM = new Vue({
        el: '#app',
        data: {
            url: "./images/1.jpg",
            leixing: 'text',
            name: 'box'
        }
    })
</script>